<div id="main-content">
    <div id="main" class="main">
        <div class="user-hd">
            <h2>2016代理商管理>>{$page_title}</h2>
        </div>
        <div class="clearfix searchspin">
            <dl>
                <dt>筛选条件:</dt>
                <dd>
                    <form action="/Admin/BillingVideoPlay/showAgentYearBilling" method="get">
                        <select class="select" name="year">
                            <option value="">全部年份</option>
                            <volist name="inf['yearList']" id="vo">
                                <if condition="$_GET['year'] eq $vo['year']">
                                    <option value="{$vo.year}" selected>{$vo.year}</option>
                                    <else/>
                                    <option value="{$vo.year}">{$vo.year}</option>
                                </if>
                            </volist>
                        </select>
                        <input type="text" maxlength="60" name="agentName" value="{:I('get.agentName')}" placeholder="代理商名称或编号" class="bg-input" style="width: 200px;">
                        <a href="{:U('Admin/BillingVideoPlay/showAgentYearBilling')}" class="sblue-btn" style="height:28px;width:68px;">清空 </a>
                        <input type="submit" class="sblue-btn" value="检索">
                        <div class="clear"></div>
                    </form>
                </dd>
            </dl>
        </div>
        <div class="spin-cont">
            <table>
                <tr>
                    <th style="width: 160px;">代理商编号</th>
                    <th  style="width: 160px;">代理商</th>
                    <th style="width: 130px;">结算流水号</th>
                    <th style="width: 130px;">结算时间</th>
                    <th style="width: 130px;">点播总金额</th>
                    <th style="width: 130px;">幕数</th>
                    <th style="width: 150px;">返点比率</th>
                    <th style="width: 150px;">返点金额</th>
                    <th style="width: 150px;">结算状态</th>
                    <th style="width: 150px;">操作</th>
                </tr>
                <volist name="inf['list']" id="vo">
                    <tr>
                        <td>{$vo.id}|{$vo.agentid}</td>
                        <td>{$vo.agent_name}</td>
                        <td>{$vo.bill_sn}</td>
                        <td>
                            <if condition="$vo['check_time'] neq 0">
                                {$vo.check_time|date='Y-m-d',###}
                            </if>
                        </td>
                        <td>{$vo.money_really}</td>
                        <td>{$vo.buy_hall_count}</td>
                        <td><php>echo $vo['rebate']*100;</php>%</td>
                        <td>{$vo.money_rebate}</td>
                        <td>{$vo.statusWord}</td>
                        <td>
                            <if condition="$vo['status'] eq 1">
                                <a  class="checkSubmit" data="{$vo.id}" style="cursor: pointer">确认返点</a>
                                <else/>
                                ~
                            </if>
                        </td>
                    </tr>
                </volist>
                <empty name="inf['list']">
                    <tr>
                        <td colspan="10">
                            没有内容...
                        </td>
                    </tr>
                </empty>
            </table>
            <div class="page txt-center">
                {$inf.page}
            </div>
        </div>
    </div>
</div>
<script>
    $(function(){
        $('.checkSubmit').on('click',function(){
            if(confirm('确认该操作？')){
                $.post("{:U('showAgentYearBilling')}", {id:$(this).attr('data')}, function (result) {
                    if (result !== false) {
                        alertMessage(' 操作成功，页面即将自动跳转~', 1, 2);
                        delayGoToPage("{:U('showAgentYearBilling')}", 2000);
                    } else {
                        alert('保存失败！请联系管理员！');
                    }
                })
            }
        })
    });
</script>